1. Field of the Invention
The present invention relates to a long thin ZigBee network. More particularly, the present invention relates to a network address assignment method and a routing method for a long thin ZigBee network.
2. Description of Related Art
Within a rapid developed wireless sensor network technique, a ZigBee network protocol therein is an essential and a widespread technique. Routing methods defined by the ZigBee network protocol mainly includes a table routing and a tree routing.
The table routing is to determine a next node to be transmitted according to table look-up. The tree touting is to rout according to address assignment. A network applying the tree routing generally has a predetermined network topology, by which position of each node within the network is determined by an address, and therefore packet transmitting direction may be determined according to the addresses of the adjacent nodes. However, the two routing methods both have shortcomings thereof and are not suitable for a long thin network. FIG. 1 is a schematic diagram of a long thin network, wherein each circle represents a node. Main structure of the long thin network is composed of a long backbone network with relatively short branch networks.
As to the table routing method, a routing table is generally stored within a limited space of each node. For example, when a node A is about to transmit a packet to a node B, whether or not routing information for reaching the node B is stored within the node A is first judged. If there is, the packet is transmitted according to the routing information. If there is not, the node A may broadcast to the next nodes for inquiring a packet transmission routing to the node B, and after the routing information is obtained, the packet is transmitted to the node B. The disadvantage of this method is that the cost is relatively high. During routing, the node A probably keeps broadcasting to the adjacent nodes for obtained the routing information, and the required broadcasting time is relatively long, which may cause a network jam and a waste of transmission bandwidth.
As to the tree routing method, the routing direction is determined according to the addresses of the adjacent nodes. The ZigBee network devices support two address types. One is an institute of electrical and electronics engineers (IEEE) address with 64 bits, the other one is a network address with 16 bits. The IEEE address is exclusive within the entire ZigBee network devices, while the network address with 16 bits may be designed by users for determining the routing information. However, since the network address has only 16 bits, so that only 216 addresses may be assigned.
Each node within the network may only have a unique network address, and the network topology applying the tree routing method must be a balanced tree. Taking a network topology with a maximum depth (MAX_DEPTH) thereof being 5 and a maximum number of children (MAX_CHILDREN) thereof being 6 as an example, the maximum depth of the network address with 16 bits is 5, as shown in FIG. 2. Only a part of the nodes are illustrated in FIG. 2 due to a large quantity thereof. As to the balanced tree with the maximum number of children thereof being 2, the maximum depth of the network address with 16 bits is 15 at most, which is not suitable for the long thin network with general maximum depth thereof being greater than 15.
As described above, the two routing methods, i.e. the table routing method and the tree routing method defined by the ZigBee network protocol are not suitable of the long thin network.